<%-- 
    Document   : categoryedit
    Created on : Jul 21, 2012, 2:36:20 AM
    Author     : Atienza-Home
--%>


<%@page import="java.util.Iterator"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Factory.Tables.Category"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
   
    Category categoryedit = (Category)session.getAttribute("pickToEditCategory");
    
    %>

<form name="CategoryEditForm" action="javascript:categoryEdit(<%=categoryedit.getCategoryID()%>,'<%=categoryedit.getCategoryPic()%>','<%=categoryedit.getCategoryName()%>','<%=categoryedit.getCategoryDescription()%>' );" method="GET">

    <div id="categoryname" style=" padding: 10px; background-color: #006666">
        <div id="spancategoryname" class="<%=categoryedit.getCategoryName()%>" ><font color="white" style=" font-size: 25px;font-weight: bold;"><%=categoryedit.getCategoryName()%> <font style="font-weight:normal;font-size:15px;">[<a href="javascript:changeName()">Edit</a>]</font> </font></div>
    </div>
    
    <%
    
    
    try{
    if(!categoryedit.getCategoryPic().isEmpty()){
        %>
        <div id="categorypic" style=" padding: 10px; background-color: #009999">
            <img src="../images/category/<%=categoryedit.getCategoryPic()%>" />
        </div>
        <%
                
    }
    }catch(Exception e){
        %>
        <div id="categorypic" style=" padding: 10px; background-color: #009999">
            <font color="white">It seems like you don't put a picture yet.Click "Browse" below.</font><br>
                       
            <input id="categorypicbrowse"  type="file" onchange="javascript:changepic();">
            
        </div>
        
        
        <%
    }
    
    %>
    
    <div style=" padding: 10px; background-color: #006666;">
        <font color="white" style="font-weight: bold;">Description:</font><br>
        <div id="categorydescription">
            <div id="spancategorydesc" class="<%=categoryedit.getCategoryDescription()%>" ><font color="white">&nbsp;&nbsp;<%=categoryedit.getCategoryDescription()%>[<a href="javascript:changeDescription()"> Edit</a>]</font><br></div>
        </div>
        
    </div>
    
    
    
    
    <div id="submiteditcategory" style="padding: 0px;">
        <input type="submit" value="Update" style="padding:5px; width: 990px; " />            
    </div>
</form>
           
            
     


